package com.ta.common.pojo.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class R {
    private Integer code;
    private String message;
    private Object data;

    public static R ok(Object data){
        return new R(0,"OK",data);
    }
    public static R ok(){
        return ok(null);
    }
    public static R fail(Object data){
        return new R(1,"FAIL",data);
    }
    public static R fail(){
        return fail(null);
    }
}
